package com.qf.spring;

import com.qf.spring.service.UserService;
import com.qf.spring.service.impl.UserServiceImpl;
import org.junit.Before;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author 王博康
 * @version 1.0
 * @project 03_spring
 * @description: TODO
 * @date 2022/3/6 0:25 星期日
 */
public class TextMain {

    private ClassPathXmlApplicationContext context;
    @Before
    public void before1(){
        context = new ClassPathXmlApplicationContext("applicationContext.xml");
    }
    @Test
    public void Test1(){
        UserService userService = context.getBean(UserServiceImpl.class);
        userService.updateUser();

    }
}
